From: Robert Lipe Date: Mon, 3 Dec 2018 05:41:22 +0000 (-0600) Subject: Modernize C style explicit (void) in decls to (), eliminate return X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~51^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=4bf6db49fa8ae0abc8a2738e33bbf7d26712ed39;p=gpsbabel.git Modernize C style explicit (void) in decls to (), eliminate return at end of bunction bodies. --- diff --git a/alan.cc b/alan.cc index 449607891..7d0c638fa 100644 --- a/alan.cc +++ b/alan.cc @@ -938,7 +938,6 @@ static void alan_wr_deinit() static void alan_exit() { - return; } /**************************************************************************/ diff --git a/cet_util.h b/cet_util.h index 8c87895ad..4cc6a40d7 100644 --- a/cet_util.h +++ b/cet_util.h @@ -31,8 +31,8 @@ #include "defs.h" cet_cs_vec_t* cet_find_cs_by_name(const QString& name); -void cet_register(void); -void cet_deregister(void); +void cet_register(); +void cet_deregister(); /* short hand transmissions */ @@ -65,7 +65,7 @@ const char* cet_convert_string(const QString& str); void cet_convert_init(const QString& cs_name, const int force); void cet_convert_strings(const cet_cs_vec_t* source, const cet_cs_vec_t* target, const char* format); -void cet_convert_deinit(void); +void cet_convert_deinit(); void cet_disp_character_set_names(FILE* fout); diff --git a/compegps.cc b/compegps.cc index f0f8cd2e0..27b3019be 100644 --- a/compegps.cc +++ b/compegps.cc @@ -379,13 +379,13 @@ compegps_rd_init(const QString& fname) } static void -compegps_rd_deinit(void) +compegps_rd_deinit() { gbfclose(fin); } static void -compegps_data_read(void) +compegps_data_read() { char* buff; int line = 0; @@ -520,7 +520,7 @@ write_route_hdr_cb(const route_head* rte) } static void -write_route(void) +write_route() { curr_index = 0; route_disp_all(write_route_hdr_cb, nullptr, write_waypt_cb); @@ -589,7 +589,7 @@ write_trkpt_cb(const Waypoint* wpt) } static void -write_track(void) +write_track() { curr_index = 0; @@ -599,7 +599,7 @@ write_track(void) } static void -write_waypoints(void) +write_waypoints() { waypt_disp_all(write_waypt_cb); } @@ -614,14 +614,14 @@ compegps_wr_init(const QString& fname) } static void -compegps_wr_deinit(void) +compegps_wr_deinit() { mkshort_del_handle(&sh); gbfclose(fout); } static void -compegps_data_write(void) +compegps_data_write() { /* because of different file extensions we can only write one GPS data type at time */ diff --git a/csv_util.cc b/csv_util.cc index 31129cb42..30d87d52b 100644 --- a/csv_util.cc +++ b/csv_util.cc @@ -708,7 +708,7 @@ dec_to_human(const char* format, const char* dirs, double val) /*****************************************************************************/ /* xcsv_file_init() - prepare xcsv_file for first use. */ /*****************************************************************************/ -void xcsv_file_init(void) +void xcsv_file_init() { xcsv_file.is_internal = false; xcsv_file.field_delimiter = QString(); @@ -1380,7 +1380,7 @@ xcsv_parse_val(const char* s, Waypoint* wpt, const field_map& fmp, /* any data conversion (the input meat) */ /*****************************************************************************/ void -xcsv_data_read(void) +xcsv_data_read() { int linecount = 0; route_head* rte = nullptr; @@ -2176,7 +2176,7 @@ xcsv_replace_tokens(const QString& original) { /* epilogues. */ /*****************************************************************************/ void -xcsv_data_write(void) +xcsv_data_write() { /* reset the index counter */ waypt_out_count = 0; diff --git a/csv_util.h b/csv_util.h index 214c3e142..8074a98da 100644 --- a/csv_util.h +++ b/csv_util.h @@ -44,13 +44,13 @@ csv_stringclean(const char* string, const char* chararray); QString csv_stringclean(const QString& string, const QString& chararray); void -xcsv_data_read(void); +xcsv_data_read(); void -xcsv_data_write(void); +xcsv_data_write(); void -xcsv_file_init(void); +xcsv_file_init(); void xcsv_prologue_add(const QString&); @@ -65,7 +65,7 @@ void xcsv_ofield_add(const QString&, const QString&, const QString&, unsigned options); void -xcsv_destroy_style(void); +xcsv_destroy_style(); QString xcsv_get_char_from_constant_table(const QString& key); diff --git a/defs.h b/defs.h index b0df8e743..97370536b 100644 --- a/defs.h +++ b/defs.h @@ -551,11 +551,11 @@ public: typedef void (*waypt_cb)(const Waypoint*); const global_trait* get_traits(); -void waypt_init(void); +void waypt_init(); //void update_common_traits(const Waypoint* wpt); void waypt_add(Waypoint* wpt); void waypt_del(Waypoint* wpt); -unsigned int waypt_count(void); +unsigned int waypt_count(); void set_waypt_count(unsigned int nc); void waypt_disp(const Waypoint* wpt); void waypt_status_disp(int total_ct, int myct); @@ -567,7 +567,7 @@ void waypt_add_to_bounds(bounds* bounds, const Waypoint* waypointp); void waypt_compute_bounds(bounds* bounds); Waypoint* find_waypt_by_name(const QString& name); void waypt_flush(queue* head); -void waypt_flush_all(void); +void waypt_flush_all(); void waypt_backup(signed int* count, queue** head_bak); void waypt_restore(signed int count, queue* head_bak); void waypt_add_url(Waypoint* wpt, const QString& link, @@ -661,12 +661,12 @@ public: typedef void (*route_hdr)(const route_head*); typedef void (*route_trl)(const route_head*); -void route_init(void); -unsigned int route_waypt_count(void); -unsigned int route_count(void); -unsigned int track_waypt_count(void); -unsigned int track_count(void); -route_head* route_head_alloc(void); +void route_init(); +unsigned int route_waypt_count(); +unsigned int route_count(); +unsigned int track_waypt_count(); +unsigned int track_count(); +route_head* route_head_alloc(); void route_add_head(route_head* rte); void route_del_head(route_head* rte); void track_add_head(route_head* rte); @@ -688,9 +688,9 @@ void route_disp(const route_head* rte, std::nullptr_t /* waypt_cb */); /* overri void route_reverse(const route_head* rte_hd); void route_disp_session(const session_t* se, route_hdr rh, route_trl rt, waypt_cb wc); void track_disp_session(const session_t* se, route_hdr rh, route_trl rt, waypt_cb wc); -void route_flush_all_routes(void); -void route_flush_all_tracks(void); -void route_flush_all(void); +void route_flush_all_routes(); +void route_flush_all_tracks(); +void route_flush_all(); void route_flush(queue* head); void route_copy(int* dst_count, int* dst_wpt_count, queue** dst, queue* src); void route_append(queue* src); @@ -799,10 +799,10 @@ typedef struct { extern posn_status tracking_status; typedef void (*ff_init)(const QString&); -typedef void (*ff_deinit)(void); -typedef void (*ff_read)(void); -typedef void (*ff_write)(void); -typedef void (*ff_exit)(void); +typedef void (*ff_deinit)(); +typedef void (*ff_read)(); +typedef void (*ff_write)(); +typedef void (*ff_exit)(); typedef void (*ff_writeposn)(Waypoint*); typedef Waypoint* (*ff_readposn)(posn_status*); @@ -838,7 +838,7 @@ typedef mkshort_handle_imp* short_handle; char* mkshort(short_handle, const char*); QString mkshort(short_handle, const QString&); -short_handle mkshort_new_handle(void); +short_handle mkshort_new_handle(); QString mkshort_from_wpt(short_handle h, const Waypoint* wpt); void mkshort_del_handle(short_handle* h); void setshort_length(short_handle, int n); @@ -972,10 +972,10 @@ void debug_print(int level, const char* fmt, ...) PRINTFLIKE(2,3); ff_vecs_t* find_vec(const char*, const char**); void assign_option(const char* vecname, arglist_t* ap, const char* val); void disp_vec_options(const char* vecname, arglist_t* ap); -void disp_vecs(void); +void disp_vecs(); void disp_vec(const char* vecname); -void init_vecs(void); -void exit_vecs(void); +void init_vecs(); +void exit_vecs(); void disp_formats(int version); const char* name_option(long type); void printposn(const double c, int is_lat); @@ -1024,10 +1024,10 @@ int xasprintf(QString* strp, const char* fmt, ...) PRINTFLIKE(2, 3); int xvasprintf(char** strp, const char* fmt, va_list ap); char* strupper(char* src); char* strlower(char* src); -signed int get_tz_offset(void); +signed int get_tz_offset(); time_t mklocaltime(struct tm* t); time_t mkgmtime(struct tm* t); -gpsbabel::DateTime current_time(void); +gpsbabel::DateTime current_time(); void dotnet_time_to_time_t(double dotnet, time_t* t, int* millisecs); signed int month_lookup(const char* m); const char* get_cache_icon(const Waypoint* waypointp); diff --git a/dmtlog.cc b/dmtlog.cc index cec7a5d61..a606055b9 100644 --- a/dmtlog.cc +++ b/dmtlog.cc @@ -638,8 +638,6 @@ read_XML() xml_init(fin->name, tlog3b_xgcb_map, nullptr); xml_read(); xml_deinit(); - - return; } /******************************************************************************* diff --git a/duplicate.cc b/duplicate.cc index 41ddf99a5..6d62688c8 100644 --- a/duplicate.cc +++ b/duplicate.cc @@ -131,7 +131,7 @@ int DuplicateFilter::compare(const void* a, const void* b) } -void DuplicateFilter::process(void) +void DuplicateFilter::process() { Waypoint* waypointp; btree_node* newnode, * btmp, * sup_tree = nullptr; diff --git a/filterdefs.h b/filterdefs.h index 6a704b497..389b1fccd 100644 --- a/filterdefs.h +++ b/filterdefs.h @@ -38,10 +38,10 @@ extern queue waypt_head; #endif #include "filter.h" -typedef void (*filter_init)(void); -typedef void (*filter_process)(void); -typedef void (*filter_deinit)(void); -typedef void (*filter_exit)(void); +typedef void (*filter_init)(); +typedef void (*filter_process)(); +typedef void (*filter_deinit)(); +typedef void (*filter_exit)(); typedef struct filter_vecs { filter_init f_init; @@ -56,8 +56,8 @@ void free_filter_vec(Filter*); void disp_filters(int version); void disp_filter(const char* vecname); void disp_filter_vec(const char* vecname); -void disp_filter_vecs(void); -void init_filter_vecs(void); -void exit_filter_vecs(void); +void disp_filter_vecs(); +void init_filter_vecs(); +void exit_filter_vecs(); #endif // FILTERDEFS_H_INCLUDED_ diff --git a/g7towin.cc b/g7towin.cc index 39e112081..7715d4ea5 100644 --- a/g7towin.cc +++ b/g7towin.cc @@ -396,13 +396,13 @@ rd_init(const QString& fname) } static void -rd_deinit(void) +rd_deinit() { gbfclose(fin); } static void -data_read(void) +data_read() { char* buff; int line = 0; diff --git a/garmin_device_xml.h b/garmin_device_xml.h index 924bb3e0f..ab05db88a 100644 --- a/garmin_device_xml.h +++ b/garmin_device_xml.h @@ -43,7 +43,7 @@ typedef struct { } gdx_info; const gdx_info* gdx_read(const char* fname); -const gdx_info* gdx_get_info(void); +const gdx_info* gdx_get_info(); const gdx_info* gdx_find_file(char** dirlist); // This is so gross. By the time we know it's not a USB device diff --git a/garmin_fit.cc b/garmin_fit.cc index 6eeb0266a..a54592aba 100644 --- a/garmin_fit.cc +++ b/garmin_fit.cc @@ -324,8 +324,7 @@ fit_parse_definition_message(uint8_t header) } def->num_fields = numOfFields; - } - return; + } } static uint32_t diff --git a/gbfile.cc b/gbfile.cc index e4561cd90..10a705216 100644 --- a/gbfile.cc +++ b/gbfile.cc @@ -474,7 +474,6 @@ static void memapi_clearerr(gbfile* self) { (void)self; - return; } static int diff --git a/jeeps/gpsapp.cc b/jeeps/gpsapp.cc index 48fc98c8c..7ef1733dc 100644 --- a/jeeps/gpsapp.cc +++ b/jeeps/gpsapp.cc @@ -4596,8 +4596,6 @@ void GPS_D303_Send(UC* data, GPS_PTrack trk, int32* len, int protoid) } *len = p-data; - - return; } /* @func GPS_D311_Send ************************************************** @@ -4618,8 +4616,6 @@ void GPS_D311_Send(UC* data, GPS_PTrack trk, int32* len) GPS_Util_Put_Short(p,strtoul(trk->trk_ident, nullptr, 0)); p += 2; *len = p-data; - - return; } /* @func GPS_D310_Send ************************************************** @@ -4646,8 +4642,6 @@ void GPS_D310_Send(UC* data, GPS_PTrack trk, int32* len) while ((*p++ = *q++)); *len = p-data; - - return; } @@ -4682,8 +4676,6 @@ static void GPS_A300_Translate(UC* s, GPS_PTrack* trk) p+=sizeof(uint32); (*trk)->tnew = *p; - - return; } @@ -4716,8 +4708,6 @@ static void GPS_A300_Encode(UC* s, GPS_PTrack trk) p+=sizeof(uint32); *p = (UC) trk->tnew; - - return; } @@ -5038,9 +5028,6 @@ static void GPS_D400_Get(GPS_PWay* way, UC* s) } (*way)->dst=GPS_Util_Get_Float(p); - - - return; } @@ -5081,8 +5068,6 @@ static void GPS_D403_Get(GPS_PWay* way, UC* s) (*way)->dspl = *p++; (*way)->dst=GPS_Util_Get_Float(p); - - return; } @@ -5138,8 +5123,6 @@ static void GPS_D450_Get(GPS_PWay* way, UC* s) } (*way)->dst=GPS_Util_Get_Float(p); - - return; } @@ -5176,8 +5159,6 @@ static void GPS_D400_Send(UC* data, GPS_PWay way, int32* len) GPS_Util_Put_Float(p,way->dst); *len = 62; - - return; } @@ -5217,8 +5198,6 @@ static void GPS_D403_Send(UC* data, GPS_PWay way, int32* len) GPS_Util_Put_Float(p,way->dst); *len = 64; - - return; } @@ -5275,8 +5254,6 @@ static void GPS_D450_Send(UC* data, GPS_PWay way, int32* len) *len = 121; - - return; } @@ -5612,8 +5589,6 @@ static void GPS_A500_Translate(UC* s, GPS_PAlmanac* alm) (*alm)->i = GPS_Util_Get_Float(p); p+=sizeof(float); - - return; } @@ -5632,8 +5607,6 @@ static void GPS_D500_Send(UC* data, GPS_PAlmanac alm) p = data; GPS_A500_Encode(p,alm); - - return; } @@ -5654,8 +5627,6 @@ static void GPS_D501_Send(UC* data, GPS_PAlmanac alm) p=data; p[42] = alm->hlth; GPS_A500_Encode(p,alm); - - return; } @@ -5676,8 +5647,6 @@ static void GPS_D550_Send(UC* data, GPS_PAlmanac alm) p = data; *p = alm->svid; GPS_A500_Encode(p+1,alm); - - return; } @@ -5699,8 +5668,6 @@ static void GPS_D551_Send(UC* data, GPS_PAlmanac alm) *p = alm->svid; GPS_A500_Encode(p+1,alm); p[43] = alm->hlth; - - return; } @@ -5751,8 +5718,6 @@ static void GPS_A500_Encode(UC* s, GPS_PAlmanac alm) p+=sizeof(float); GPS_Util_Put_Float(p,alm->i); - - return; } @@ -5957,8 +5922,6 @@ void GPS_D600_Send(GPS_PPacket& packet, time_t Time) GPS_Make_Packet(&packet, LINK_ID[gps_link_type].Pid_Date_Time_Data, data,8); - - return; } @@ -6093,9 +6056,6 @@ void GPS_D700_Get(GPS_PPacket& packet, double* lat, double* lon) t = GPS_Util_Get_Double(p); *lon = GPS_Math_Rad_To_Deg(t); - - - return; } @@ -6125,8 +6085,6 @@ void GPS_D700_Send(GPS_PPacket& packet, double lat, double lon) GPS_Make_Packet(&packet, LINK_ID[gps_link_type].Pid_Position_Data, data,16); - - return; } @@ -6300,8 +6258,6 @@ void GPS_D800_Get(GPS_PPacket& packet, GPS_PPvt_Data* pvt) p+=sizeof(int16); (*pvt)->wn_days = GPS_Util_Get_Int(p); - - return; } /* @func GPS_A906_Get ****************************************************** @@ -6505,7 +6461,6 @@ void GPS_D1011b_Get(GPS_PLap* Lap, UC* p) */ } - return; } @@ -6753,8 +6708,6 @@ void GPS_D1006_Send(UC* data, GPS_PCourse crs, int32* len) p += 2; *len = p-data; - - return; } @@ -6976,8 +6929,6 @@ void GPS_D1007_Get(GPS_PCourse_Lap* clp, UC* p) (*clp)->avg_cadence = *p; } p++; - - return; } @@ -7027,8 +6978,6 @@ void GPS_D1007_Send(UC* data, GPS_PCourse_Lap clp, int32* len) *p++ = clp->avg_cadence > 0 ? clp->avg_cadence : 0xff; *len = p-data; - - return; } @@ -7278,8 +7227,6 @@ void GPS_D1012_Send(UC* data, GPS_PCourse_Point cpt, int32* len) *p++ = cpt->point_type; *len = p-data; - - return; } diff --git a/jeeps/gpsdevice_usb.cc b/jeeps/gpsdevice_usb.cc index 6425721a9..3471ae0ca 100644 --- a/jeeps/gpsdevice_usb.cc +++ b/jeeps/gpsdevice_usb.cc @@ -27,7 +27,7 @@ garmin_unit_info_t garmin_unit_info[GUSB_MAX_UNITS]; -static int32 success_stub(void) +static int32 success_stub() { return 1; } diff --git a/jeeps/gpslibusb.cc b/jeeps/gpslibusb.cc index f60f1d5f9..1a65c6ae3 100644 --- a/jeeps/gpslibusb.cc +++ b/jeeps/gpslibusb.cc @@ -167,7 +167,7 @@ gusb_teardown(gpsdevh* dh) } static void -gusb_atexit_teardown(void) +gusb_atexit_teardown() { gusb_teardown(nullptr); } @@ -208,7 +208,7 @@ gusb_atexit_teardown(void) * Grrrr! */ unsigned -gusb_reset_toggles(void) +gusb_reset_toggles() { static const unsigned char oinit[12] = {0, 0, 0, 0, GUSB_SESSION_START, 0, 0, 0, 0, 0, 0, 0}; diff --git a/jeeps/gpsmem.cc b/jeeps/gpsmem.cc index 14181104b..0e1bbb45e 100644 --- a/jeeps/gpsmem.cc +++ b/jeeps/gpsmem.cc @@ -37,7 +37,7 @@ ** @return [GPS_PPvt_Data] virgin pvt **********************************************************************/ -GPS_PPvt_Data GPS_Pvt_New(void) +GPS_PPvt_Data GPS_Pvt_New() { GPS_PPvt_Data ret; @@ -78,7 +78,7 @@ void GPS_Pvt_Del(GPS_PPvt_Data* thys) ** @return [GPS_PAlmanac] virgin almanac **********************************************************************/ -GPS_PAlmanac GPS_Almanac_New(void) +GPS_PAlmanac GPS_Almanac_New() { GPS_PAlmanac ret; @@ -123,7 +123,7 @@ void GPS_Almanac_Del(GPS_PAlmanac* thys) ** @return [GPS_PTrack] virgin track **********************************************************************/ -GPS_PTrack GPS_Track_New(void) +GPS_PTrack GPS_Track_New() { GPS_PTrack ret; @@ -164,7 +164,7 @@ void GPS_Track_Del(GPS_PTrack* thys) ** @return [GPS_PWay] virgin waypoint **********************************************************************/ -GPS_PWay GPS_Way_New(void) +GPS_PWay GPS_Way_New() { GPS_PWay ret; int32 i; @@ -252,7 +252,7 @@ void GPS_Way_Del(GPS_PWay* thys) ** @return [GPS_PLap] virgin lap **********************************************************************/ -GPS_PLap GPS_Lap_New(void) +GPS_PLap GPS_Lap_New() { GPS_PLap ret; @@ -291,7 +291,7 @@ void GPS_Lap_Del(GPS_PLap* thys) ** ** @return [GPS_PCourse] virgin Course **********************************************************************/ -GPS_PCourse GPS_Course_New(void) +GPS_PCourse GPS_Course_New() { GPS_PCourse ret; @@ -329,7 +329,7 @@ void GPS_Course_Del(GPS_PCourse* thys) ** @return [GPS_PCourse_Lap] virgin course lap **********************************************************************/ -GPS_PCourse_Lap GPS_Course_Lap_New(void) +GPS_PCourse_Lap GPS_Course_Lap_New() { GPS_PCourse_Lap ret; @@ -368,7 +368,7 @@ void GPS_Course_Lap_Del(GPS_PCourse_Lap* thys) ** @return [GPS_PCourse_Point] virgin course point **********************************************************************/ -GPS_PCourse_Point GPS_Course_Point_New(void) +GPS_PCourse_Point GPS_Course_Point_New() { GPS_PCourse_Point ret; diff --git a/jeeps/gpsmem.h b/jeeps/gpsmem.h index 9d6ca3ef3..fe8a73f8a 100644 --- a/jeeps/gpsmem.h +++ b/jeeps/gpsmem.h @@ -3,21 +3,21 @@ #include "gps.h" - GPS_PPvt_Data GPS_Pvt_New(void); + GPS_PPvt_Data GPS_Pvt_New(); void GPS_Pvt_Del(GPS_PPvt_Data* thys); - GPS_PAlmanac GPS_Almanac_New(void); + GPS_PAlmanac GPS_Almanac_New(); void GPS_Almanac_Del(GPS_PAlmanac* thys); - GPS_PTrack GPS_Track_New(void); + GPS_PTrack GPS_Track_New(); void GPS_Track_Del(GPS_PTrack* thys); - GPS_PWay GPS_Way_New(void); + GPS_PWay GPS_Way_New(); void GPS_Way_Del(GPS_PWay* thys); - GPS_PLap GPS_Lap_New(void); + GPS_PLap GPS_Lap_New(); void GPS_Lap_Del(GPS_PLap* thys); - GPS_PCourse GPS_Course_New(void); + GPS_PCourse GPS_Course_New(); void GPS_Course_Del(GPS_PCourse* thys); - GPS_PCourse_Lap GPS_Course_Lap_New(void); + GPS_PCourse_Lap GPS_Course_Lap_New(); void GPS_Course_Lap_Del(GPS_PCourse_Lap* thys); - GPS_PCourse_Point GPS_Course_Point_New(void); + GPS_PCourse_Point GPS_Course_Point_New(); void GPS_Course_Point_Del(GPS_PCourse_Point* thys); #endif diff --git a/jeeps/gpsprot.cc b/jeeps/gpsprot.cc index 9960650cf..5329187b4 100644 --- a/jeeps/gpsprot.cc +++ b/jeeps/gpsprot.cc @@ -415,7 +415,7 @@ void GPS_Protocol_Error(US tag, US data) ** @return [void] ************************************************************************/ -void GPS_Unknown_Protocol_Print(void) +void GPS_Unknown_Protocol_Print() { int32 i; diff --git a/jeeps/gpsprot.h b/jeeps/gpsprot.h index 6c16df083..0c96ce3cd 100644 --- a/jeeps/gpsprot.h +++ b/jeeps/gpsprot.h @@ -371,7 +371,7 @@ US GPS_Protocol_Version_Change(US id, US version); COMMON int32 GPS_Protocol_Table_Set(US id); void GPS_Protocol_Error(US tag, US data); - void GPS_Unknown_Protocol_Print(void); + void GPS_Unknown_Protocol_Print(); #endif diff --git a/jeeps/gpsread.cc b/jeeps/gpsread.cc index 79ddda999..2ed95e403 100644 --- a/jeeps/gpsread.cc +++ b/jeeps/gpsread.cc @@ -39,7 +39,7 @@ ** @return [time_t] number of bytes read **********************************************************************/ -time_t GPS_Time_Now(void) +time_t GPS_Time_Now() { time_t secs; diff --git a/jeeps/gpsread.h b/jeeps/gpsread.h index 65d9b3996..fa1c501bb 100644 --- a/jeeps/gpsread.h +++ b/jeeps/gpsread.h @@ -4,7 +4,7 @@ #include "gps.h" - time_t GPS_Time_Now(void); + time_t GPS_Time_Now(); int32 GPS_Serial_Packet_Read(gpsdevh* fd, GPS_PPacket* packet); int32 GPS_Serial_Get_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* rec); diff --git a/jeeps/gpsusbcommon.cc b/jeeps/gpsusbcommon.cc index 50ce4179f..8d632708e 100644 --- a/jeeps/gpsusbcommon.cc +++ b/jeeps/gpsusbcommon.cc @@ -240,7 +240,7 @@ gusb_id_unit(garmin_unit_info_t* gu) } void -gusb_syncup(void) +gusb_syncup() { static int unit_number; static const char oinit[12] = diff --git a/jeeps/gpsusbcommon.h b/jeeps/gpsusbcommon.h index 94d71f4e9..f0f8d259e 100644 --- a/jeeps/gpsusbcommon.h +++ b/jeeps/gpsusbcommon.h @@ -36,9 +36,9 @@ typedef struct gusb_llops { } gusb_llops_t; /* Provided by the common code. */ -void gusb_syncup(void); +void gusb_syncup(); void gusb_register_ll(struct gusb_llops*); -void gusb_list_units(void); +void gusb_list_units(); /* Provided by the OS layers */ // int gusb_init(const char *portname, gpsdev **dh); diff --git a/jeeps/gpsutil.h b/jeeps/gpsutil.h index 2f7083080..15d70ec9f 100644 --- a/jeeps/gpsutil.h +++ b/jeeps/gpsutil.h @@ -4,7 +4,7 @@ #include "gps.h" - int32 GPS_Util_Little(void); + int32 GPS_Util_Little(); US GPS_Util_Get_Short(const UC* s); void GPS_Util_Put_Short(UC* s, const US v); @@ -23,18 +23,18 @@ void GPS_Error(const char* fmt, ...); void GPS_Serial_Error(const char* hdr, ...); void GPS_Fatal(const char* s); - void GPS_Enable_Error(void); - void GPS_Enable_Warning(void); - void GPS_Disable_Error(void); - void GPS_Disable_Warning(void); + void GPS_Enable_Error(); + void GPS_Enable_Warning(); + void GPS_Disable_Error(); + void GPS_Disable_Warning(); void GPS_User(const char* fmt, ...); - void GPS_Disable_User(void); - void GPS_Enable_User(void); + void GPS_Disable_User(); + void GPS_Enable_User(); void GPS_Diagnose(int32 c); void GPS_Diag(const char* fmt, ...); - void GPS_Enable_Diagnose(void); - void GPS_Disable_Diagnose(void); + void GPS_Enable_Diagnose(); + void GPS_Disable_Diagnose(); #endif diff --git a/jeeps/jgpsutil.cc b/jeeps/jgpsutil.cc index 9d151d25d..67b670b7f 100644 --- a/jeeps/jgpsutil.cc +++ b/jeeps/jgpsutil.cc @@ -42,7 +42,7 @@ int32 gps_errno = 0; ** @return [int32] true if little-endian ************************************************************************/ -int32 GPS_Util_Little(void) +int32 GPS_Util_Little() { static union lb { char chars[sizeof(int32)]; @@ -525,7 +525,7 @@ void GPS_Error(const char* fmt, ...) ** @@ ****************************************************************************/ -void GPS_Enable_Error(void) +void GPS_Enable_Error() { gps_error = 1; return; @@ -541,7 +541,7 @@ void GPS_Enable_Error(void) ** @@ ****************************************************************************/ -void GPS_Enable_Warning(void) +void GPS_Enable_Warning() { gps_warning = 1; return; @@ -557,7 +557,7 @@ void GPS_Enable_Warning(void) ** @@ ****************************************************************************/ -void GPS_Disable_Error(void) +void GPS_Disable_Error() { gps_error = 0; return; @@ -573,7 +573,7 @@ void GPS_Disable_Error(void) ** @@ ****************************************************************************/ -void GPS_Disable_Warning(void) +void GPS_Disable_Warning() { gps_warning = 0; return; @@ -612,7 +612,7 @@ void GPS_User(const char* fmt, ...) ** @@ ****************************************************************************/ -void GPS_Disable_User(void) +void GPS_Disable_User() { gps_user = 0; return; @@ -627,7 +627,7 @@ void GPS_Disable_User(void) ** @@ ****************************************************************************/ -void GPS_Enable_User(void) +void GPS_Enable_User() { gps_user = 1; return; @@ -677,7 +677,7 @@ void GPS_Diag(const char* fmt, ...) ** @@ ****************************************************************************/ -void GPS_Enable_Diagnose(void) +void GPS_Enable_Diagnose() { gps_show_bytes = 1; return; @@ -693,7 +693,7 @@ void GPS_Enable_Diagnose(void) ** @@ ****************************************************************************/ -void GPS_Disable_Diagnose(void) +void GPS_Disable_Diagnose() { gps_show_bytes = 0; return; diff --git a/magproto.cc b/magproto.cc index e3e44173f..1c4649b0d 100644 --- a/magproto.cc +++ b/magproto.cc @@ -818,7 +818,6 @@ mag_rd_init_common(const QString& portname) } } - return; } static void @@ -1400,7 +1399,6 @@ mag_waypt_pr(const Waypoint* waypointp) static void mag_track_nop(const route_head*) { - return; } static diff --git a/mapsource.cc b/mapsource.cc index 146eb2f06..e991a83a0 100644 --- a/mapsource.cc +++ b/mapsource.cc @@ -451,7 +451,6 @@ mps_mapsegment_r(gbfile* mps_file, int mps_ver) if (reclen >= 0) { gbfseek(mps_file, reclen+1, SEEK_CUR); } - return; } @@ -476,7 +475,6 @@ mps_mapsetname_r(gbfile* mps_file, int mps_ver) gbfseek(mps_file, -5, SEEK_CUR); int reclen = gbfgetint32(mps_file); gbfseek(mps_file, reclen+1, SEEK_CUR); - return; } @@ -585,12 +583,6 @@ mps_waypoint_r(gbfile* mps_file, int mps_ver, Waypoint** wpt, unsigned int* mpsc /* might need to change this to handle version dependent icon handling */ thisWaypoint->icon_descr = gt_find_desc_from_icon_number(icon, MAPSOURCE); - - /* The following Now done elsewhere since it can be useful to read in and - perhaps not add to the list */ - /* waypt_add(thisWaypoint); */ - - return; } /* @@ -1082,8 +1074,6 @@ mps_route_r(gbfile* mps_file, int mps_ver, route_head** rte) } route_add_wpt(rte_head, thisWaypoint); - - return; } /* @@ -1521,7 +1511,6 @@ mps_track_r(gbfile* mps_file, int mps_ver, route_head** trk) } /* while (trk_count--) */ - return; } @@ -1769,7 +1758,6 @@ mps_read() printf("};\n"); #endif - return ; } diff --git a/mtk_locus.cc b/mtk_locus.cc index cbbffc209..ab7f4335a 100644 --- a/mtk_locus.cc +++ b/mtk_locus.cc @@ -280,7 +280,6 @@ read_line() packetnum++; dbg(1, "Line %i: %s\n", packetnum, line); - return; } void diff --git a/mtk_logger.cc b/mtk_logger.cc index 00b96396d..9d47deef4 100644 --- a/mtk_logger.cc +++ b/mtk_logger.cc @@ -799,7 +799,6 @@ mtk_retry: mtk_erase(); } - return; } diff --git a/navilink.cc b/navilink.cc index 229044af0..f2542225c 100644 --- a/navilink.cc +++ b/navilink.cc @@ -1091,7 +1091,6 @@ navilink_common_init(const QString& name) write_route_end = file_write_route_end; } - return; } static void @@ -1128,7 +1127,6 @@ navilink_deinit() gbfclose(file_handle); } - return; } static void diff --git a/nukedata.cc b/nukedata.cc index aad78ce8f..1f4740fb9 100644 --- a/nukedata.cc +++ b/nukedata.cc @@ -27,7 +27,7 @@ #if FILTERS_ENABLED #define MYNAME "nukedata" -void NukeDataFilter::process(void) +void NukeDataFilter::process() { if (*nukewpts != '0') { waypt_flush_all(); diff --git a/ozi.cc b/ozi.cc index 82d3b2008..ef9a147fe 100644 --- a/ozi.cc +++ b/ozi.cc @@ -225,8 +225,6 @@ ozi_openfile(const QString& fname) } file_out = gbfopen(tmpname, "wb", MYNAME); - - return; } static void diff --git a/psitrex.cc b/psitrex.cc index cfb99088a..d8b77d70b 100644 --- a/psitrex.cc +++ b/psitrex.cc @@ -718,8 +718,6 @@ psit_read() } } while (!gbfeof(psit_file_in)); - return; - #ifdef DUMP_ICON_TABLE printf("\t{ -1, NULL },\n"); printf("};\n"); diff --git a/raymarine.cc b/raymarine.cc index 2093519ca..0ae045534 100644 --- a/raymarine.cc +++ b/raymarine.cc @@ -410,7 +410,6 @@ write_route_wpt_cb(const Waypoint* wpt) } rte_wpt_index++; - return; } static void diff --git a/session.h b/session.h index 9487b8729..e34cc4439 100644 --- a/session.h +++ b/session.h @@ -33,10 +33,10 @@ public: session_t(const QString& name_p, const QString& filename_p) : name{name_p},filename{filename_p} {} }; -void session_init(void); -void session_exit(void); +void session_init(); +void session_exit(); void start_session(const QString& name, const QString& filename); -const session_t* curr_session(void); +const session_t* curr_session(); #endif // SESSION_H_INCLUDED_ diff --git a/shape.cc b/shape.cc index 4d98aedbf..1f51a6352 100644 --- a/shape.cc +++ b/shape.cc @@ -163,7 +163,7 @@ DBFCreateGpsbabel(const QString& pszFilename) #endif static -void dump_fields(void) +void dump_fields() { char name[12]; warning(MYNAME ": Database fields:\n"); @@ -223,7 +223,7 @@ my_rd_init(const QString& fname) } static void -my_read(void) +my_read() { // option processing here instead of in my_rd_init // lets the results of option processing be automatic. @@ -398,7 +398,7 @@ err: } static void -my_rd_deinit(void) +my_rd_deinit() { SHPClose(ihandle); DBFClose(ihandledb); @@ -412,7 +412,7 @@ my_wr_init(const QString& fname) } static void -my_wr_deinit(void) +my_wr_deinit() { SHPClose(ohandle); DBFClose(ohandledb); @@ -477,7 +477,7 @@ poly_deinit(const route_head* rte) static void -my_write(void) +my_write() { // shape files can only contain one shape type in addition // to the null shape type. diff --git a/src/core/xmlstreamwriter.h b/src/core/xmlstreamwriter.h index d99618186..3f605edc9 100644 --- a/src/core/xmlstreamwriter.h +++ b/src/core/xmlstreamwriter.h @@ -53,7 +53,7 @@ public: explicit XmlStreamWriter(QFile* f); - void writeStartDocument(void); + void writeStartDocument(); void writeOptionalAttribute(const QString& qualifiedName, const QString& value); void writeOptionalTextElement(const QString& qualifiedName, const QString& text); }; diff --git a/stmsdf.cc b/stmsdf.cc index e45aacd55..3a8e569f9 100644 --- a/stmsdf.cc +++ b/stmsdf.cc @@ -174,7 +174,7 @@ track_qsort_cb(const void* a, const void* b) } static void -finalize_tracks(void) +finalize_tracks() { queue* elem, *tmp; route_head* track = nullptr; @@ -370,7 +370,7 @@ rd_init(const QString& fname) } static void -rd_deinit(void) +rd_deinit() { gbfclose(fin); rte_name = QString(); @@ -378,7 +378,7 @@ rd_deinit(void) } static void -data_read(void) +data_read() { char* buf; sdf_section_e section = sdf_unknown; @@ -672,14 +672,14 @@ wr_init(const QString& fname) } static void -wr_deinit(void) +wr_deinit() { mkshort_del_handle(&short_h); gbfclose(fout); } static void -data_write(void) +data_write() { gbfprintf(fout, "[HEADER]\n"); gbfprintf(fout, "FILEVERSION=1\n"); diff --git a/stmwpp.cc b/stmwpp.cc index cdca3bbed..1ef603e47 100644 --- a/stmwpp.cc +++ b/stmwpp.cc @@ -69,13 +69,13 @@ stmwpp_rd_init(const QString& fname) } static void -stmwpp_rd_deinit(void) +stmwpp_rd_deinit() { gbfclose(fin); } static void -stmwpp_data_read(void) +stmwpp_data_read() { int line = 0; @@ -200,7 +200,7 @@ stmwpp_rw_init(const QString& fname) } static void -stmwpp_rw_deinit(void) +stmwpp_rw_deinit() { mkshort_del_handle(&short_h); gbfclose(fout); @@ -277,7 +277,7 @@ stmwpp_waypt_cb(const Waypoint* wpt) } static void -stmwpp_data_write(void) +stmwpp_data_write() { setshort_length(short_h, 100); setshort_badchars(short_h, ",\r\n"); diff --git a/swapdata.cc b/swapdata.cc index 1941215ee..ac2aa32c7 100644 --- a/swapdata.cc +++ b/swapdata.cc @@ -35,15 +35,13 @@ void SwapDataFilter::swapdata_cb(const Waypoint* ref) double x = wpt->latitude; wpt->latitude = wpt->longitude; wpt->longitude = x; - - return; } /******************************************************************************* * %%% global callbacks called by gpsbabel main process %%% * *******************************************************************************/ -void SwapDataFilter::process(void) /* this procedure must be present in vecs */ +void SwapDataFilter::process() /* this procedure must be present in vecs */ { WayptFunctor swapdata_cb_f(this, &SwapDataFilter::swapdata_cb); diff --git a/vecs.cc b/vecs.cc index 7267cc80b..940f2e918 100644 --- a/vecs.cc +++ b/vecs.cc @@ -1546,7 +1546,6 @@ disp_vecs() } } xfree(svp); - return; } void @@ -1572,7 +1571,6 @@ disp_vec(const char* vecname) } } xfree(svp); - return; } /* diff --git a/xcsv.cc b/xcsv.cc index 4efbe9f54..6b3e140a1 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -112,7 +112,7 @@ char_map_t xcsv_char_table[] = { }; void -xcsv_destroy_style(void) +xcsv_destroy_style() { /* @@ -450,7 +450,7 @@ xcsv_rd_init(const QString& fname) } static void -xcsv_rd_deinit(void) +xcsv_rd_deinit() { xcsv_file.file->close(); delete xcsv_file.file; @@ -529,7 +529,7 @@ xcsv_wr_position_init(const QString& fname) } static void -xcsv_wr_deinit(void) +xcsv_wr_deinit() { xcsv_file.stream->flush(); xcsv_file.file->close(); @@ -543,7 +543,7 @@ xcsv_wr_deinit(void) } static void -xcsv_wr_position_deinit(void) +xcsv_wr_position_deinit() { xcsv_wr_deinit(); } diff --git a/xmlgeneric.h b/xmlgeneric.h index 52fd007db..0139b775c 100644 --- a/xmlgeneric.h +++ b/xmlgeneric.h @@ -50,10 +50,10 @@ extern const char* xhtml_entities; void xml_ignore_tags(const char** taglist); void xml_init(const QString& fname, xg_tag_mapping* tbl,const char* encoding); -void xml_read(void); +void xml_read(); void xml_readstring(const char* str); void xml_readprefixstring(const char* str); void xml_readunicode(const QString& str); -void xml_deinit(void); +void xml_deinit(); #endif // XMLGENERIC_H_INCLUDED_